from playwright.sync_api import sync_playwright,Playwright
import time

def run(p: Playwright):
    browser = p.chromium.launch(headless=False)
    context = browser.new_context()
    page = context.new_page()
    page.goto('https://www.jiuxian.com/')
    time.sleep(2)
    page.locator('xpath=/html/body/div[2]/div/div[1]/div/a[1]').click()
    time.sleep(2)


    context.close()
    browser.close()


with sync_playwright() as p:
    run(p)